#pragma once
#include <mutex>
#include <list>
#include <bitset>

class MemoryChunk
{
public:
    MemoryChunk(char* ptr,std::size_t n):
        chunk_(ptr),
        size_(n)
    {
    }

    char *data()
    {
        return chunk_;
    }

    std::size_t size() const
    {
        return size_;
    }

private:
    char *chunk_;
    std::size_t size_;
};
class MemoryPoolImpl
{
public:
    virtual void *allocate(std::size_t n) = 0;
    virtual void deallocate(void *const ptr, std::size_t n) = 0;
    virtual std::size_t ROUND_UP(std::size_t n) const = 0;
};

